class Window_Energy < Window_Base
  attr_accessor   :record
  def initialize
    super(0, 100, 180, 70)
    self.contents = Bitmap.new(self.width - 40, self.height / 2)
    self.opacity = 0
    @record = -1
  end
  def refresh
    if @record != $game_party.battle_energy
      @record = $game_party.battle_energy
      self.opacity = 150
      self.contents.clear
      self.contents.font.color = normal_color
      self.contents.draw_text(0, 0, self.width - 40, self.height / 2, "能量：" +$game_party.battle_energy.to_s)
    end
    if self.opacity > 0
      self.opacity -= 10
    end
  end
end
